<div class="mainbox">
    <div class="cart">
        <div class="title">
            购物车
        </div>
        <div class="cartdetail">
            {{#if user.cart_detail.length}} {{#each user.cart_detail}} {{#each goods_info}}
            <div class="cartitem {{cartPrivate&&'focus'}}">
                <div class="hidden {{cartPrivate&&'focus'}}">
                    <p>确定删除此商品吗？</p>
                    <div>
                        <button event-click="{{'$Top.$Event.cart.remove_goods'}}">删除</button>
                        <button event-click="{{'$Top.$Event.changToEdit'}}">取消</button>
                    </div>
                </div>
                <div class="gimg">
                    <a href="#default/goods_details?id={{goods_id}}">
                        <img src="{{goods.preview_img_url}}?imageView/1/h/120" />
                    </a>
                </div>
                <div class="gcontent">
                    <div class="name">{{goods.goods_name+' '+goods.intro}}</div>
                    <div class="count">
                        <div class="num">
                            数量：
                            <input type="text" event-change="{{'$Top.$Event.cart.update_cart_num'}}" value="{{num}}" bind-input="{{'num'}}" />
                        </div>
                        <div class="price">￥{{#Fixed goods.price}}</div>
                    </div>
                </div>
                <div class="icon-remove2" event-click="{{'$Top.$Event.changToEdit'}}"></div>
            </div>
            {{/each}} {{/each}} {{#else}}
            <div class="nothing">
                <div class="icon-cart2"></div>
                <p>购物车还是空的，快去选购吧！</p>
            </div>
            {{/if}}
        </div>

        <div class="cartcount">
            总计：
            <span style="color:red">￥{{#Fixed $Cache.cart.total_price}}</span>
            <button event-click="{{'$Event.cart.cart_to_ach'}}">结算</button>
        </div>
    </div>
</div>
